<template>
  <div class="test app-container">
    <nav-bar title="测试" left-arrow fixed placeholder />

  </div>
</template>

<script>

export default {
  name: 'test',
  data () {
    return {
      Switch: true
    }
  },
  created () {
    window.test = this
    /*eslint-disable*/
    mui.plusReady(function () {
      let NotifyID = 1;
      let Context = plus.android.importClass("android.content.Context");
      let main = plus.android.runtimeMainActivity();
      let Noti = plus.android.importClass("android.app.Notification");
      let NotificationManager = plus.android.importClass("android.app.NotificationManager");
      let nm = main.getSystemService(Context.NOTIFICATION_SERVICE)
      let Notification = plus.android.importClass("android.app.Notification");
      let mNotification = new Notification.Builder(main);
      // mNotification.setOngoing(true);
      mNotification.setContentTitle("Title")
      mNotification.setContentText("Text")
      mNotification.setSmallIcon(17301620)
      mNotification.setTicker("PadInfo")

      mNotification.setNumber(10)
      let mNb = mNotification.build()
      nm.notify(NotifyID , mNb);
    })
    /*eslint-disable*/
  },
  mounted () {
  },
  methods: {
    handleClick (e) {
    }
  }
}
</script>

<style scoped lang="less">
@import "~common/style/variable.less";

</style>

